package com.guodexian.mapper;

import com.guodexian.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface UserMapper {
    @Select("select * from user_star where user_id=#{id}")
    public User selectById(int id);
    @Insert("insert into  user_star values (default,#{userName},#{userTel},#{userPass},#{userImg})")
    public int insert(User user);
    @Update("update  user_star set user_name=#{userName},user_tel=#{userTel},user_img=#{userImg},user_pass=#{userPass} where user_id=#{userId}")
    public int update(User user);
    @Delete("delete from user_star where user_id=#{id}")
    public int deleteById(int id);
}